package com.ztgf.shopping.api.client.shop;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ztgf.common.constant.Result;
import com.ztgf.common.enums.CodeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;
import com.ztgf.shopping.models.service.shop.IShopInfoAuditLogService;
import com.ztgf.shopping.models.dto.shop.ShopInfoAuditLogDTO;

/**
 * 店铺审核日志控制器
 *
 * @author zhanghualang
 * @Date 2020-06-16 16:21:25
 */

@RestController
@RequestMapping("/api/shopInfoAuditLog")
@Slf4j
@Api(value = "ShopInfoAuditLogApiController",tags = "店铺审核日志Api接口")
public class ShopInfoAuditLogApiController {

    @DubboReference
    private IShopInfoAuditLogService shopInfoAuditLogService;

    @PostMapping("/get")
    @ApiOperation(value = "根据id查找",notes = "根据id查找")
    @ApiImplicitParam(name = "id",value = "id",required = true,paramType = "query", dataType = "Long")
    public Result<ShopInfoAuditLogDTO> get(@RequestParam("id") Long id){
        if(id == null){
            return new Result<>(CodeEnum.FAIL_100002 );
        }

        ShopInfoAuditLogDTO dto = shopInfoAuditLogService.selectById(id);

        return new Result<>(dto);
    }
}
